# Maintainer: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
pkgname=wlrobs
pkgver=1.0
pkgrel=4
pkgdesc="obs-studio plugin that allows you to screen capture on wlroots"
url="https://hg.sr.ht/~scoopta/wlrobs"
arch="all !riscv64 !ppc64le" # obs -> luajit
license="GPL-3.0-only"
makedepends="
	libdrm-dev
	mesa-dev
	meson
	ninja
	obs-studio-dev
	wayland-dev
"
source="https://dev.alpinelinux.org/archive/wlrobs/wlrobs-$pkgver.tar.gz "
builddir="$srcdir/$pkgname-v$pkgver"
options="!check" # No tests provided

_srcurl="https://hg.sr.ht/~scoopta/wlrobs/archive/v$pkgver.tar.gz"

snapshot() {
	mkdir -p "$srcdir"
	wget "$_srcurl" -O "$srcdir/$pkgname-$pkgver.tar.gz"
	scp "$srcdir/$pkgname-$pkgver.tar.gz" \
		dev.alpinelinux.org:/archive/$pkgname/
}

build() {
	abuild-meson \
		-Duse_dmabuf=true \
		build
	meson compile -C build
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C build
}

sha512sums="
801b95edc426d1c85567ff3dff5ae483090ba9e38e11564b60305a41096e496db2da27c472df92b22c2bd44be717432a9a62e051125eba77b30d2b57326f8683  wlrobs-1.0.tar.gz
"
